package org.example.study6;

public class SingletonLazyTest2 {
    public static void main(String[] args) {
        // 创建10个线程
        for (int i = 0; i < 3; i++) {
            Thread thread = new Thread(() -> {
                // 获取单例对象
                SingletonLazy instance = SingletonLazy.getInstance();
                // 打印结象结果
                System.out.println(instance);
            });
            // 启动线程
            thread.start();
        }
    }
}

/*
org.example.study6.SingletonLazy@5f57cf75
org.example.study6.SingletonLazy@52571486
org.example.study6.SingletonLazy@5f57cf75
*/